package com.lyc.shopping_mall.service.iml;

import com.lyc.shopping_mall.mapper.UserMapper;
import com.lyc.shopping_mall.pojo.User;
import com.lyc.shopping_mall.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceiml implements UserService {

    @Autowired
    UserMapper userMapper;

    @Override
    public List<User> getAllUsers() {
        return userMapper.getAllUser();
    }

    @Override
    public User getUserByUsernameAndPassword(String username, String userpassword) {
        return userMapper.getUserByUsernameAndPassword(username, userpassword);
    }

    @Override
    public Integer addUser(User user) {
        return userMapper.addUser(user);
    }
}
